<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4"
      lang="en">
<head>
    <meta charset="UTF-8">
    <title>Index</title>
</head>
<body>
<h1>这里是首页</h1>

<a th:href="@{/user/index}">前往用户</a>
<a th:href="@{/admin/index}">前往管理</a>

<span th:text="${#authentication.getName()}"></span>


<span sec:authorize="hasRole('ADMIN')">
    <h1>yonghu</h1>
</span>

</body>
</html>